#!/bin/sh
#
# /etc/init.d/rcS
#

echo -n "Mounting benchmark tools disk..."
mkdir /mnt/benchtools
/bin/mount /dev/hdb1 /mnt/benchtools
echo "done."

echo "Enabling disk DMA..."
/mnt/benchtools/hdparm-9.39/hdparm -d 1 /dev/hda
echo "done."

echo "Running DMA benchmark..."
/mnt/benchtools/hdparm-9.39/hdparm -tT /dev/hda
echo "done."

echo "Disabling disk DMA..."
/mnt/benchtools/hdparm-9.39/hdparm -d 0 /dev/hda
echo "done."

echo "Running non-DMA benchmark..."
/mnt/benchtools/hdparm-9.39/hdparm -tT /dev/hda
echo "done."

echo "Enabling disk DMA..."
/mnt/benchtools/hdparm-9.39/hdparm -d 1 /dev/hda
echo "done."

m5 exit
